<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/html/MyTag.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="html/Style/skin.css" />
    	    
<script type="text/javascript" src="html/Js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
	$(function(){
	for(var i = 0;i<5;i++)
	{
	 	var total = $("#totalMoney"+i).html();
	 	total = eval(total);
		$("#totalMoney"+i).html(total);
	}
	$("#consumername").select();
	$("#consumername").select();
	});
</script>
</head>
    <body>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!-- 头部开始 -->
            <tr>
                <td width="17" valign="top" background="html/Images/mail_left_bg.gif">
                    <img src="html/Images/left_top_right.gif" width="17" height="29" />
                </td>
                <td valign="top" background="html/Images/content_bg.gif">
                    <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" background="./html/Images/content_bg.gif">
                        <tr><td height="31"><div class="title">订单列表</div></td></tr>
                    </table>
                </td>
                <td width="16" valign="top" background="html/Images/mail_right_bg.gif"><img src="html/Images/nav_right_bg.gif" width="16" height="29" /></td>
            </tr>
            <!-- 中间部分开始 -->
            <tr>
                <!--第一行左边框-->
                <td valign="middle" background="html/Images/mail_left_bg.gif">&nbsp;</td>
                <!--第一行中间内容-->
                <td valign="top" bgcolor="#F7F8F9">
                    <table style="width:100%" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <!-- 空白行-->
                        <tr><td colspan="2" valign="top">&nbsp;</td><td>&nbsp;</td><td valign="top">&nbsp;</td></tr>
						<tr>
							<td colspan="4">
								<form class="clearfix">
									<div style="float:left">
										<p style="float:left; margin-left:30px;">
											<select>
												<option id="consumername">客户姓名</option>
												<option id="telephone">联系电话</option>
											</select>
											<input class="text" name="consumername" id="searchInfo" style="width:80px;"/>
										</p>
										<p style="float:left; margin-left:30px;"><input type="button" class="btn" value="查询"/></p>
									</div>
								</form>
							<td>
						</tr>
                        <!-- 一条线 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 列表展示开始 -->
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="96%">
                                <table width="100%">
                                    <tr>
                                        <td colspan="2">
                                            <form action="" method="">
                                                <table width="100%"  class="cont tr_color">
                                                    <tr>
                                                        <th>序号</th>
                                                        <th>选择</th>
                                                        <th>客户姓名</th>
                                                        <th>性别</th>
                                                        <th>客户类型</th>
                                                        <th>客户状态</th>
														<th>已消费次数</th>
                                                        <th>消费总额（单位：万元）</th>
                                                        <th>服务代表</th>
                                                        <th width="18%">操作</th>
                                                    </tr>
                                                   <c:forEach items="${page.list }" var="customer" varStatus="vs">
                                                   
                                                   
                                                   
                                                    <tr align="center" class="d">
                                                   		<td>${vs.index+1 }</td>
                                                        <td><input type="checkbox" value="" /></td>
                                                        <td><a href="../../customer/resource/view.html">${customer.consumername }</a></td>
                                                        <td>
                                                        
                                                        <c:if test="${customer.sex==1 }">男</c:if>
                                                        <c:if test="${customer.sex==2 }">女</c:if>
                                                        </td>
                                                        <td>
                                                        	<c:if test="${customer.type==0 }">普通客户</c:if>
                                                        	<c:if test="${customer.type==1 }">金卡客户</c:if>
                                                        	<c:if test="${customer.type==2 }">银卡客户</c:if>
                                                        	<c:if test="${customer.type==3 }">vip客户</c:if>
                                                        </td>
                                                        <td>
                                                        	<c:if test="${customer.state==0 }">未分配</c:if>
                                                        	<c:if test="${customer.state==1 }">已分配</c:if>
                                                        </td>
                                                        <td>${customer.orders.size()}</td>
														<td id="totalMoney${vs.index }"><c:forEach items="${customer.orders }" var="order">
															${order.payAllMoney }+
														</c:forEach>0</td>
                                                        <td>${customer.businessMan.name }</td>
                                                        <td>
															<a href="add.html">代下新单</a>&nbsp;&nbsp;
                                                        	<a href="history.html">历史订单</a>
														</td>
                                                    </tr>
                                                   </c:forEach> 
                                                    
                                                   
                                                    
                                                </table>
                                            </form>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="2%">&nbsp;</td>
                        </tr>
                        <!--列表展示结束 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="51%" class="left_txt">
                           		<input type="button" value="全选" />&nbsp;&nbsp;&nbsp;
                                <input type="button" value="反选" />
                            	
                            
                            
                            <div style="float:right;"><b>
                            	<page:pagePrint url="order.do" key="nowPage" pageUtil="${page }"/>    
                            </div>
                            
                            </td>
                            <td>&nbsp;</td><td>&nbsp;</td>
                        </tr>
                    </table>
                </td>
                <td background="html/Images/mail_right_bg.gif">&nbsp;</td>
            </tr>
            <!-- 底部部分 -->
            <tr>
                <td valign="bottom" background="html/Images/mail_left_bg.gif">
                    <img src="html/Images/buttom_left.gif" width="17" height="17" />
                </td>
                <td background="html/Images/buttom_bgs.gif">
                    <img src="html/Images/buttom_bgs.gif" width="17" height="17">
                </td>
                <td valign="bottom" background="html/Images/mail_right_bg.gif">
                    <img src="html/Images/buttom_right.gif" width="16" height="17" />
                </td>           
            </tr>
        </table>
    </body>
</html>